package com.hzqy.web.ac;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hzqy.service.mysong.MySongSheetServiceBean;
import com.hzqy.service.weekFree.WeekFreeServiceBean;
import com.hzqy.web.vo.MySongSheetVo;

@Controller
@RequestMapping("/mySongSheet")
public class MySongSheetAction {
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	@Resource
	private MySongSheetServiceBean mySongSheetService;
	
	@RequestMapping("/selectMySongSheetInfo")
	@ResponseBody
	public Object selectMySongSheetInfo(MySongSheetVo mySongSheetVo) {
		Map<String,Object> map = new HashMap<String,Object>();
		MySongSheetVo mssv = mySongSheetService.selectMySongSheetVoInfo(mySongSheetVo);
		map.put("mySongSheetVo", mssv);
		return map;
	}
	
	@ RequestMapping("/insertMySongSheet")
	@ResponseBody
	public Object insertMySongSheet(MySongSheetVo mySongSheetVo) {
		Map<String,Object> map = new HashMap<String,Object>();
		int result = mySongSheetService.insertOrUpdate(mySongSheetVo);
		map.put("result", result);
		return map;
	}
}
